<?php 
namespace Admin\Model;
use Think\Model\RelationModel;

class TopicclassModel extends RelationModel
{
	protected $_link=array(
        'topic'=>array(
            'mapping_type'=>self::HAS_MANY,//HAS_ONE查询出一条
            'class_name'=>'topic',
            'mapping_name'=>'top',
            'foreign_key'=>'class',
        ),   
        );
}